Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
mark(fst(X1, X2)) → active(fst(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(X))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(len(X)) → active(len(mark(X)))
fst(mark(X1), X2) → fst(X1, X2)
fst(X1, mark(X2)) → fst(X1, X2)
fst(active(X1), X2) → fst(X1, X2)
fst(X1, active(X2)) → fst(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
len(mark(X)) → len(X)
len(active(X)) → len(X)

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
mark(fst(X1, X2)) → active(fst(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(X))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(len(X)) → active(len(mark(X)))
fst(mark(X1), X2) → fst(X1, X2)
fst(X1, mark(X2)) → fst(X1, X2)
fst(active(X1), X2) → fst(X1, X2)
fst(X1, active(X2)) → fst(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
len(mark(X)) → len(X)
len(active(X)) → len(X)

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

MARK(fst(X1, X2)) → MARK(X2)
FROM(mark(X)) → FROM(X)
ADD(active(X1), X2) → ADD(X1, X2)
ACTIVE(len(cons(X, Z))) → LEN(Z)
ACTIVE(fst(s(X), cons(Y, Z))) → MARK(cons(Y, fst(X, Z)))
MARK(fst(X1, X2)) → MARK(X1)
MARK(cons(X1, X2)) → MARK(X1)
CONS(X1, mark(X2)) → CONS(X1, X2)
FROM(active(X)) → FROM(X)
ADD(X1, active(X2)) → ADD(X1, X2)
ADD(mark(X1), X2) → ADD(X1, X2)
MARK(len(X)) → MARK(X)
MARK(fst(X1, X2)) → ACTIVE(fst(mark(X1), mark(X2)))
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), mark(X2)))
MARK(len(X)) → LEN(mark(X))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(add(X1, X2)) → ADD(mark(X1), mark(X2))
S(active(X)) → S(X)
MARK(cons(X1, X2)) → CONS(mark(X1), X2)
MARK(s(X)) → ACTIVE(s(X))
MARK(len(X)) → ACTIVE(len(mark(X)))
ACTIVE(len(cons(X, Z))) → MARK(s(len(Z)))
ACTIVE(len(nil)) → MARK(0)
FST(active(X1), X2) → FST(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)
FST(X1, active(X2)) → FST(X1, X2)
ACTIVE(from(X)) → FROM(s(X))
FST(X1, mark(X2)) → FST(X1, X2)
CONS(mark(X1), X2) → CONS(X1, X2)
ACTIVE(fst(0, Z)) → MARK(nil)
ACTIVE(add(s(X), Y)) → ADD(X, Y)
ACTIVE(add(s(X), Y)) → S(add(X, Y))
MARK(from(X)) → FROM(mark(X))
MARK(add(X1, X2)) → MARK(X2)
ACTIVE(fst(s(X), cons(Y, Z))) → FST(X, Z)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
LEN(active(X)) → LEN(X)
ADD(X1, mark(X2)) → ADD(X1, X2)
MARK(add(X1, X2)) → MARK(X1)
CONS(X1, active(X2)) → CONS(X1, X2)
FST(mark(X1), X2) → FST(X1, X2)
LEN(mark(X)) → LEN(X)
MARK(from(X)) → MARK(X)
S(mark(X)) → S(X)
MARK(fst(X1, X2)) → FST(mark(X1), mark(X2))
ACTIVE(fst(s(X), cons(Y, Z))) → CONS(Y, fst(X, Z))
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
ACTIVE(len(cons(X, Z))) → S(len(Z))
ACTIVE(from(X)) → S(X)
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(0) → ACTIVE(0)
MARK(nil) → ACTIVE(nil)
ACTIVE(add(0, X)) → MARK(X)
ACTIVE(from(X)) → CONS(X, from(s(X)))

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
mark(fst(X1, X2)) → active(fst(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(X))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(len(X)) → active(len(mark(X)))
fst(mark(X1), X2) → fst(X1, X2)
fst(X1, mark(X2)) → fst(X1, X2)
fst(active(X1), X2) → fst(X1, X2)
fst(X1, active(X2)) → fst(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
len(mark(X)) → len(X)
len(active(X)) → len(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(fst(X1, X2)) → MARK(X2)
FROM(mark(X)) → FROM(X)
ADD(active(X1), X2) → ADD(X1, X2)
ACTIVE(len(cons(X, Z))) → LEN(Z)
ACTIVE(fst(s(X), cons(Y, Z))) → MARK(cons(Y, fst(X, Z)))
MARK(fst(X1, X2)) → MARK(X1)
MARK(cons(X1, X2)) → MARK(X1)
CONS(X1, mark(X2)) → CONS(X1, X2)
FROM(active(X)) → FROM(X)
ADD(X1, active(X2)) → ADD(X1, X2)
ADD(mark(X1), X2) → ADD(X1, X2)
MARK(len(X)) → MARK(X)
MARK(fst(X1, X2)) → ACTIVE(fst(mark(X1), mark(X2)))
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), mark(X2)))
MARK(len(X)) → LEN(mark(X))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(add(X1, X2)) → ADD(mark(X1), mark(X2))
S(active(X)) → S(X)
MARK(cons(X1, X2)) → CONS(mark(X1), X2)
MARK(s(X)) → ACTIVE(s(X))
MARK(len(X)) → ACTIVE(len(mark(X)))
ACTIVE(len(cons(X, Z))) → MARK(s(len(Z)))
ACTIVE(len(nil)) → MARK(0)
FST(active(X1), X2) → FST(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)
FST(X1, active(X2)) → FST(X1, X2)
ACTIVE(from(X)) → FROM(s(X))
FST(X1, mark(X2)) → FST(X1, X2)
CONS(mark(X1), X2) → CONS(X1, X2)
ACTIVE(fst(0, Z)) → MARK(nil)
ACTIVE(add(s(X), Y)) → ADD(X, Y)
ACTIVE(add(s(X), Y)) → S(add(X, Y))
MARK(from(X)) → FROM(mark(X))
MARK(add(X1, X2)) → MARK(X2)
ACTIVE(fst(s(X), cons(Y, Z))) → FST(X, Z)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
LEN(active(X)) → LEN(X)
ADD(X1, mark(X2)) → ADD(X1, X2)
MARK(add(X1, X2)) → MARK(X1)
CONS(X1, active(X2)) → CONS(X1, X2)
FST(mark(X1), X2) → FST(X1, X2)
LEN(mark(X)) → LEN(X)
MARK(from(X)) → MARK(X)
S(mark(X)) → S(X)
MARK(fst(X1, X2)) → FST(mark(X1), mark(X2))
ACTIVE(fst(s(X), cons(Y, Z))) → CONS(Y, fst(X, Z))
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
ACTIVE(len(cons(X, Z))) → S(len(Z))
ACTIVE(from(X)) → S(X)
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(0) → ACTIVE(0)
MARK(nil) → ACTIVE(nil)
ACTIVE(add(0, X)) → MARK(X)
ACTIVE(from(X)) → CONS(X, from(s(X)))

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
mark(fst(X1, X2)) → active(fst(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(X))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(len(X)) → active(len(mark(X)))
fst(mark(X1), X2) → fst(X1, X2)
fst(X1, mark(X2)) → fst(X1, X2)
fst(active(X1), X2) → fst(X1, X2)
fst(X1, active(X2)) → fst(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
len(mark(X)) → len(X)
len(active(X)) → len(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 7 SCCs with 18 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

LEN(active(X)) → LEN(X)
LEN(mark(X)) → LEN(X)

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
mark(fst(X1, X2)) → active(fst(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(X))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(len(X)) → active(len(mark(X)))
fst(mark(X1), X2) → fst(X1, X2)
fst(X1, mark(X2)) → fst(X1, X2)
fst(active(X1), X2) → fst(X1, X2)
fst(X1, active(X2)) → fst(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
len(mark(X)) → len(X)
len(active(X)) → len(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

LEN(active(X)) → LEN(X)
LEN(mark(X)) → LEN(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ADD(active(X1), X2) → ADD(X1, X2)
ADD(X1, active(X2)) → ADD(X1, X2)
ADD(X1, mark(X2)) → ADD(X1, X2)
ADD(mark(X1), X2) → ADD(X1, X2)

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
mark(fst(X1, X2)) → active(fst(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(X))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(len(X)) → active(len(mark(X)))
fst(mark(X1), X2) → fst(X1, X2)
fst(X1, mark(X2)) → fst(X1, X2)
fst(active(X1), X2) → fst(X1, X2)
fst(X1, active(X2)) → fst(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
len(mark(X)) → len(X)
len(active(X)) → len(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ADD(active(X1), X2) → ADD(X1, X2)
ADD(X1, active(X2)) → ADD(X1, X2)
ADD(X1, mark(X2)) → ADD(X1, X2)
ADD(mark(X1), X2) → ADD(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

FROM(mark(X)) → FROM(X)
FROM(active(X)) → FROM(X)

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
mark(fst(X1, X2)) → active(fst(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(X))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(len(X)) → active(len(mark(X)))
fst(mark(X1), X2) → fst(X1, X2)
fst(X1, mark(X2)) → fst(X1, X2)
fst(active(X1), X2) → fst(X1, X2)
fst(X1, active(X2)) → fst(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
len(mark(X)) → len(X)
len(active(X)) → len(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

FROM(mark(X)) → FROM(X)
FROM(active(X)) → FROM(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(X1, active(X2)) → CONS(X1, X2)
CONS(mark(X1), X2) → CONS(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)
CONS(X1, mark(X2)) → CONS(X1, X2)

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
mark(fst(X1, X2)) → active(fst(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(X))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(len(X)) → active(len(mark(X)))
fst(mark(X1), X2) → fst(X1, X2)
fst(X1, mark(X2)) → fst(X1, X2)
fst(active(X1), X2) → fst(X1, X2)
fst(X1, active(X2)) → fst(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
len(mark(X)) → len(X)
len(active(X)) → len(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(mark(X1), X2) → CONS(X1, X2)
CONS(X1, active(X2)) → CONS(X1, X2)
CONS(X1, mark(X2)) → CONS(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(mark(X)) → S(X)
S(active(X)) → S(X)

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
mark(fst(X1, X2)) → active(fst(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(X))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(len(X)) → active(len(mark(X)))
fst(mark(X1), X2) → fst(X1, X2)
fst(X1, mark(X2)) → fst(X1, X2)
fst(active(X1), X2) → fst(X1, X2)
fst(X1, active(X2)) → fst(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
len(mark(X)) → len(X)
len(active(X)) → len(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(active(X)) → S(X)
S(mark(X)) → S(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

FST(X1, mark(X2)) → FST(X1, X2)
FST(active(X1), X2) → FST(X1, X2)
FST(mark(X1), X2) → FST(X1, X2)
FST(X1, active(X2)) → FST(X1, X2)

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
mark(fst(X1, X2)) → active(fst(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(X))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(len(X)) → active(len(mark(X)))
fst(mark(X1), X2) → fst(X1, X2)
fst(X1, mark(X2)) → fst(X1, X2)
fst(active(X1), X2) → fst(X1, X2)
fst(X1, active(X2)) → fst(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
len(mark(X)) → len(X)
len(active(X)) → len(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

FST(X1, mark(X2)) → FST(X1, X2)
FST(active(X1), X2) → FST(X1, X2)
FST(mark(X1), X2) → FST(X1, X2)
FST(X1, active(X2)) → FST(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(fst(X1, X2)) → MARK(X2)
MARK(from(X)) → MARK(X)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(add(X1, X2)) → MARK(X2)
ACTIVE(fst(s(X), cons(Y, Z))) → MARK(cons(Y, fst(X, Z)))
MARK(fst(X1, X2)) → MARK(X1)
MARK(s(X)) → ACTIVE(s(X))
MARK(cons(X1, X2)) → MARK(X1)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(len(X)) → ACTIVE(len(mark(X)))
MARK(add(X1, X2)) → MARK(X1)
ACTIVE(len(cons(X, Z))) → MARK(s(len(Z)))
MARK(len(X)) → MARK(X)
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), mark(X2)))
MARK(fst(X1, X2)) → ACTIVE(fst(mark(X1), mark(X2)))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
ACTIVE(add(0, X)) → MARK(X)

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
mark(fst(X1, X2)) → active(fst(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(X))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(len(X)) → active(len(mark(X)))
fst(mark(X1), X2) → fst(X1, X2)
fst(X1, mark(X2)) → fst(X1, X2)
fst(active(X1), X2) → fst(X1, X2)
fst(X1, active(X2)) → fst(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
len(mark(X)) → len(X)
len(active(X)) → len(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(s(X)) → ACTIVE(s(X))
The remaining pairs can at least be oriented weakly.

MARK(fst(X1, X2)) → MARK(X2)
MARK(from(X)) → MARK(X)
MARK(add(X1, X2)) → MARK(X2)
ACTIVE(fst(s(X), cons(Y, Z))) → MARK(cons(Y, fst(X, Z)))
MARK(fst(X1, X2)) → MARK(X1)
MARK(cons(X1, X2)) → MARK(X1)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(len(X)) → ACTIVE(len(mark(X)))
MARK(add(X1, X2)) → MARK(X1)
ACTIVE(len(cons(X, Z))) → MARK(s(len(Z)))
MARK(len(X)) → MARK(X)
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), mark(X2)))
MARK(fst(X1, X2)) → ACTIVE(fst(mark(X1), mark(X2)))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
ACTIVE(add(0, X)) → MARK(X)
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = 1   
POL(active(x1)) = 0   
POL(add(x1, x2)) = 1   
POL(cons(x1, x2)) = 0   
POL(from(x1)) = 1   
POL(fst(x1, x2)) = 1   
POL(len(x1)) = 1   
POL(mark(x1)) = 0   
POL(nil) = 0   
POL(s(x1)) = 0   

The following usable rules [17] were oriented:

len(active(X)) → len(X)
len(mark(X)) → len(X)
add(X1, mark(X2)) → add(X1, X2)
add(mark(X1), X2) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
fst(X1, mark(X2)) → fst(X1, X2)
fst(mark(X1), X2) → fst(X1, X2)
fst(active(X1), X2) → fst(X1, X2)
fst(X1, active(X2)) → fst(X1, X2)
from(active(X)) → from(X)
from(mark(X)) → from(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(fst(X1, X2)) → MARK(X2)
MARK(from(X)) → MARK(X)
MARK(add(X1, X2)) → MARK(X2)
ACTIVE(fst(s(X), cons(Y, Z))) → MARK(cons(Y, fst(X, Z)))
MARK(fst(X1, X2)) → MARK(X1)
MARK(cons(X1, X2)) → MARK(X1)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(len(X)) → ACTIVE(len(mark(X)))
MARK(add(X1, X2)) → MARK(X1)
ACTIVE(len(cons(X, Z))) → MARK(s(len(Z)))
MARK(len(X)) → MARK(X)
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(fst(X1, X2)) → ACTIVE(fst(mark(X1), mark(X2)))
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), mark(X2)))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
ACTIVE(add(0, X)) → MARK(X)

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
mark(fst(X1, X2)) → active(fst(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(X))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(len(X)) → active(len(mark(X)))
fst(mark(X1), X2) → fst(X1, X2)
fst(X1, mark(X2)) → fst(X1, X2)
fst(active(X1), X2) → fst(X1, X2)
fst(X1, active(X2)) → fst(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
len(mark(X)) → len(X)
len(active(X)) → len(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MARK(from(X)) → MARK(X)
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
The remaining pairs can at least be oriented weakly.

MARK(fst(X1, X2)) → MARK(X2)
MARK(add(X1, X2)) → MARK(X2)
ACTIVE(fst(s(X), cons(Y, Z))) → MARK(cons(Y, fst(X, Z)))
MARK(fst(X1, X2)) → MARK(X1)
MARK(cons(X1, X2)) → MARK(X1)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(len(X)) → ACTIVE(len(mark(X)))
MARK(add(X1, X2)) → MARK(X1)
ACTIVE(len(cons(X, Z))) → MARK(s(len(Z)))
MARK(len(X)) → MARK(X)
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(fst(X1, X2)) → ACTIVE(fst(mark(X1), mark(X2)))
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), mark(X2)))
ACTIVE(add(0, X)) → MARK(X)
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = 1 + x1   
POL(MARK(x1)) = 1 + x1   
POL(active(x1)) = x1   
POL(add(x1, x2)) = x1 + x2   
POL(cons(x1, x2)) = x1   
POL(from(x1)) = 1 + x1   
POL(fst(x1, x2)) = x1 + x2   
POL(len(x1)) = x1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = 0   

The following usable rules [17] were oriented:

active(fst(0, Z)) → mark(nil)
active(add(0, X)) → mark(X)
active(from(X)) → mark(cons(X, from(s(X))))
mark(s(X)) → active(s(X))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
mark(fst(X1, X2)) → active(fst(mark(X1), mark(X2)))
active(add(s(X), Y)) → mark(s(add(X, Y)))
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(from(X)) → active(from(mark(X)))
mark(len(X)) → active(len(mark(X)))
active(len(cons(X, Z))) → mark(s(len(Z)))
len(active(X)) → len(X)
len(mark(X)) → len(X)
add(X1, mark(X2)) → add(X1, X2)
add(mark(X1), X2) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
mark(0) → active(0)
mark(nil) → active(nil)
active(len(nil)) → mark(0)
fst(X1, mark(X2)) → fst(X1, X2)
fst(mark(X1), X2) → fst(X1, X2)
fst(active(X1), X2) → fst(X1, X2)
fst(X1, active(X2)) → fst(X1, X2)
from(active(X)) → from(X)
from(mark(X)) → from(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ QDPOrderProof
QDP
                    ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(fst(X1, X2)) → MARK(X2)
MARK(add(X1, X2)) → MARK(X2)
ACTIVE(fst(s(X), cons(Y, Z))) → MARK(cons(Y, fst(X, Z)))
MARK(fst(X1, X2)) → MARK(X1)
MARK(cons(X1, X2)) → MARK(X1)
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
MARK(len(X)) → ACTIVE(len(mark(X)))
MARK(add(X1, X2)) → MARK(X1)
ACTIVE(len(cons(X, Z))) → MARK(s(len(Z)))
MARK(len(X)) → MARK(X)
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(fst(X1, X2)) → ACTIVE(fst(mark(X1), mark(X2)))
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), mark(X2)))
ACTIVE(add(0, X)) → MARK(X)

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
mark(fst(X1, X2)) → active(fst(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(X))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(len(X)) → active(len(mark(X)))
fst(mark(X1), X2) → fst(X1, X2)
fst(X1, mark(X2)) → fst(X1, X2)
fst(active(X1), X2) → fst(X1, X2)
fst(X1, active(X2)) → fst(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
len(mark(X)) → len(X)
len(active(X)) → len(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MARK(fst(X1, X2)) → MARK(X2)
MARK(add(X1, X2)) → MARK(X2)
MARK(fst(X1, X2)) → MARK(X1)
MARK(cons(X1, X2)) → MARK(X1)
MARK(len(X)) → ACTIVE(len(mark(X)))
MARK(add(X1, X2)) → MARK(X1)
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(fst(X1, X2)) → ACTIVE(fst(mark(X1), mark(X2)))
MARK(add(X1, X2)) → ACTIVE(add(mark(X1), mark(X2)))
The remaining pairs can at least be oriented weakly.

ACTIVE(fst(s(X), cons(Y, Z))) → MARK(cons(Y, fst(X, Z)))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
ACTIVE(len(cons(X, Z))) → MARK(s(len(Z)))
MARK(len(X)) → MARK(X)
ACTIVE(add(0, X)) → MARK(X)
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(ACTIVE(x1)) = x1   
POL(MARK(x1)) = 1 + x1   
POL(active(x1)) = x1   
POL(add(x1, x2)) = 1 + x1 + x2   
POL(cons(x1, x2)) = 1 + x1   
POL(from(x1)) = 1 + x1   
POL(fst(x1, x2)) = 1 + x1 + x2   
POL(len(x1)) = x1   
POL(mark(x1)) = x1   
POL(nil) = 1   
POL(s(x1)) = 0   

The following usable rules [17] were oriented:

active(fst(0, Z)) → mark(nil)
active(add(0, X)) → mark(X)
active(from(X)) → mark(cons(X, from(s(X))))
mark(s(X)) → active(s(X))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
mark(fst(X1, X2)) → active(fst(mark(X1), mark(X2)))
active(add(s(X), Y)) → mark(s(add(X, Y)))
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(from(X)) → active(from(mark(X)))
mark(len(X)) → active(len(mark(X)))
active(len(cons(X, Z))) → mark(s(len(Z)))
len(active(X)) → len(X)
len(mark(X)) → len(X)
add(X1, mark(X2)) → add(X1, X2)
add(mark(X1), X2) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
mark(0) → active(0)
mark(nil) → active(nil)
active(len(nil)) → mark(0)
fst(X1, mark(X2)) → fst(X1, X2)
fst(mark(X1), X2) → fst(X1, X2)
fst(active(X1), X2) → fst(X1, X2)
fst(X1, active(X2)) → fst(X1, X2)
from(active(X)) → from(X)
from(mark(X)) → from(X)
s(active(X)) → s(X)
s(mark(X)) → s(X)
cons(X1, active(X2)) → cons(X1, X2)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(len(cons(X, Z))) → MARK(s(len(Z)))
MARK(len(X)) → MARK(X)
ACTIVE(fst(s(X), cons(Y, Z))) → MARK(cons(Y, fst(X, Z)))
ACTIVE(add(s(X), Y)) → MARK(s(add(X, Y)))
ACTIVE(add(0, X)) → MARK(X)

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
mark(fst(X1, X2)) → active(fst(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(X))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(len(X)) → active(len(mark(X)))
fst(mark(X1), X2) → fst(X1, X2)
fst(X1, mark(X2)) → fst(X1, X2)
fst(active(X1), X2) → fst(X1, X2)
fst(X1, active(X2)) → fst(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
len(mark(X)) → len(X)
len(active(X)) → len(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 4 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ DependencyGraphProof
QDP
                            ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

MARK(len(X)) → MARK(X)

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
mark(fst(X1, X2)) → active(fst(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(X))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(add(X1, X2)) → active(add(mark(X1), mark(X2)))
mark(len(X)) → active(len(mark(X)))
fst(mark(X1), X2) → fst(X1, X2)
fst(X1, mark(X2)) → fst(X1, X2)
fst(active(X1), X2) → fst(X1, X2)
fst(X1, active(X2)) → fst(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
add(mark(X1), X2) → add(X1, X2)
add(X1, mark(X2)) → add(X1, X2)
add(active(X1), X2) → add(X1, X2)
add(X1, active(X2)) → add(X1, X2)
len(mark(X)) → len(X)
len(active(X)) → len(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ QDPOrderProof
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ QDPSizeChangeProof

Q DP problem:
The TRS P consists of the following rules:

MARK(len(X)) → MARK(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs: